public class test5 {
    public static void main(String[] args) {
        Runnable r=new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(1000);
                    System.out.println("hello thread");
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }

            }
        };
        Thread t1=new Thread(r);
        t1.start();
        System.out.println("hello main");

    }

}
